import pymysql.cursors
connect=pymysql.Connect(
    host='localhost',
    port=3306,
    user='root',
    passwd='315315',
    db='wanjia',
    charset='utf8'
 )
cursor=connect.cursor()
sql="insert into admin(id,name,user,password)values('%s','%s','%d','%d')"
data1=('01','wan',1021,123123)
data2=('02','w',1022,123123)
data3=('03','an',1023,123123)
cursor.execute(sql % data1)
cursor.execute(sql % data2)
cursor.execute(sql % data3)
connect.commit()
print('成功')

